package com.jpush.customer.feign;

import com.jpush.customer.pojo.V1CsdAppTopDetailReqDTO;
import com.jpush.customer.pojo.V1CsdNestAppCrowdCreateReqDTO;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "jpush-product",  url = "${third.kepler.psd.url}")
public interface KeplerClient {

    @RequestMapping(value = "/push/product/export", method = RequestMethod.POST)
    Response appTopExport(@RequestBody V1CsdAppTopDetailReqDTO reqDTO);

    @PostMapping(value = "/push/product/create-task",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String createTask(@RequestParam(value = "reqDTO") V1CsdNestAppCrowdCreateReqDTO reqDTO, @RequestPart(value = "file", required = false) MultipartFile file);

    @PostMapping(value = "/push/product/create-task")
    String param( V1CsdNestAppCrowdCreateReqDTO reqDTO);

    @PostMapping(value = "/multiFile",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public String multiFile( @RequestParam(value = "photos", required = false) MultipartFile[] file);

    @GetMapping("/push/product/")
    String index();
}

